package fr.enac;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Menu extends Activity implements OnClickListener{
	private Button startButton;
	private Button statButton;
	
	public void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);

		setContentView(R.layout.menu);
		startButton = (Button) findViewById(R.id.button2);
		statButton = (Button) findViewById(R.id.button1);
		
		startButton.setOnClickListener(this);
		statButton.setOnClickListener(this);


	}

	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.button2 :
			Intent intent = new Intent(Menu.this, JoggingActivity.class);
			startActivity(intent);
			break;
		case R.id.button1 :
			Intent intent2 = new Intent(Menu.this, StatActivity.class);
			startActivity(intent2);
		default:
			break;
		}
	}
}
